/**
 *
 */
import OpenApi;
import OpenApi.OpenApiUtil;

extends OpenApi;


init(config: OpenApiUtil.Config){
  super(config);
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('expressconnectrouter', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!$isNull(endpoint)) {
    return endpoint;
  }
  
  if (!$isNull(endpointMap) && !$isNull(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model ActivateFlowLogRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  flowLogId?: string(name='FlowLogId', description='The ID of the flow log.

This parameter is required.', example='flowlog-m5evbtbpt****'),
}

model ActivateFlowLogResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='05130E79-588D-5C40-A718-C4863A59****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model ActivateFlowLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ActivateFlowLogResponseBody(name='body'),
}

/**
 * @summary Enables log delivery.
 *
 * @param request ActivateFlowLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ActivateFlowLogResponse
 */
async function activateFlowLogWithOptions(request: ActivateFlowLogRequest, runtime: $RuntimeOptions): ActivateFlowLogResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.flowLogId)) {
    body['FlowLogId'] = request.flowLogId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ActivateFlowLog',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Enables log delivery.
 *
 * @param request ActivateFlowLogRequest
 * @return ActivateFlowLogResponse
 */
async function activateFlowLog(request: ActivateFlowLogRequest): ActivateFlowLogResponse {
  var runtime = new $RuntimeOptions{};
  return activateFlowLogWithOptions(request, runtime);
}

model AttachExpressConnectRouterChildInstanceRequest {
  childInstanceId?: string(name='ChildInstanceId', description='The VBR ID.

This parameter is required.', example='vbr-j6cwxhgg0s5nuephp****'),
  childInstanceOwnerId?: long(name='ChildInstanceOwnerId', description='The ID of the Alibaba Cloud account to which the VBR belongs.

>  If you want to connect to a network instance that belongs to a different account, this parameter is required.', example='190550144868****'),
  childInstanceRegionId?: string(name='ChildInstanceRegionId', description='The region ID of the VBR.

This parameter is required.', example='cn-hangzhou'),
  childInstanceType?: string(name='ChildInstanceType', description='The type of the network instance. Set the value to **VBR**.

This parameter is required.', example='VBR'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  description?: string(name='Description'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-a5xqrgbeidz1w8****'),
}

model AttachExpressConnectRouterChildInstanceResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model AttachExpressConnectRouterChildInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AttachExpressConnectRouterChildInstanceResponseBody(name='body'),
}

/**
 * @summary Associates a virtual border router (VBR) with an Express Connect router (ECR).
 *
 * @description Before you call the **AttachExpressConnectRouterChildInstance** operation to associate a VBR with an ECR, make sure that the ECR is in the **Active** state.
 *
 * @param request AttachExpressConnectRouterChildInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AttachExpressConnectRouterChildInstanceResponse
 */
async function attachExpressConnectRouterChildInstanceWithOptions(request: AttachExpressConnectRouterChildInstanceRequest, runtime: $RuntimeOptions): AttachExpressConnectRouterChildInstanceResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.childInstanceId)) {
    body['ChildInstanceId'] = request.childInstanceId;
  }
  if (!$isNull(request.childInstanceOwnerId)) {
    body['ChildInstanceOwnerId'] = request.childInstanceOwnerId;
  }
  if (!$isNull(request.childInstanceRegionId)) {
    body['ChildInstanceRegionId'] = request.childInstanceRegionId;
  }
  if (!$isNull(request.childInstanceType)) {
    body['ChildInstanceType'] = request.childInstanceType;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'AttachExpressConnectRouterChildInstance',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Associates a virtual border router (VBR) with an Express Connect router (ECR).
 *
 * @description Before you call the **AttachExpressConnectRouterChildInstance** operation to associate a VBR with an ECR, make sure that the ECR is in the **Active** state.
 *
 * @param request AttachExpressConnectRouterChildInstanceRequest
 * @return AttachExpressConnectRouterChildInstanceResponse
 */
async function attachExpressConnectRouterChildInstance(request: AttachExpressConnectRouterChildInstanceRequest): AttachExpressConnectRouterChildInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return attachExpressConnectRouterChildInstanceWithOptions(request, runtime);
}

model CheckAddRegionToExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   true: performs only a dry run.
*   false (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-fu8rszhgv7623c****'),
  freshRegionId?: string(name='FreshRegionId', description='The ID of the region for which you want to check whether the CDT service is enabled for the ECR feature.

This parameter is required.', example='cn-hangzhou'),
}

model CheckAddRegionToExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  anyCrossBorderLink?: boolean(name='AnyCrossBorderLink', description='Indicates whether the ECR is used to establish connections between regions in the Chinese mainland and regions outside China. Valid values:

*   **true**
*   **false**', example='true'),
  anyInterRegionLink?: boolean(name='AnyInterRegionLink', description='Indicates whether the ECR is used to establish connections between regions in the Chinese mainland. Valid values:

*   **true**
*   **false**', example='true'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsInstanceId**, the request parameter **DtsInstanceId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  isCdtCrossBorderEnabled?: boolean(name='IsCdtCrossBorderEnabled', description='Indicates whether the cross-border CDT service is activated for the account to which the ECR belongs. Valid values:

*   **true**
*   **false**', example='true'),
  isCdtInterRegionEnabled?: boolean(name='IsCdtInterRegionEnabled', description='Indicates whether the CDT service is activated for the account to which the ECR belongs. Valid values:

*   **true**
*   **false**', example='true'),
  isUserAllowedToCreateCrossBorderLink?: boolean(name='IsUserAllowedToCreateCrossBorderLink', description='Indicates whether the account to which the ECR belongs can create cross-border connections. Valid values:

*   **true**
*   **false**', example='true'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model CheckAddRegionToExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CheckAddRegionToExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Checks the Cloud Data Transfer (CDT) service required to add a region to an Express Connect router (ECR).
 *
 * @param request CheckAddRegionToExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CheckAddRegionToExpressConnectRouterResponse
 */
async function checkAddRegionToExpressConnectRouterWithOptions(request: CheckAddRegionToExpressConnectRouterRequest, runtime: $RuntimeOptions): CheckAddRegionToExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.freshRegionId)) {
    body['FreshRegionId'] = request.freshRegionId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CheckAddRegionToExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Checks the Cloud Data Transfer (CDT) service required to add a region to an Express Connect router (ECR).
 *
 * @param request CheckAddRegionToExpressConnectRouterRequest
 * @return CheckAddRegionToExpressConnectRouterResponse
 */
async function checkAddRegionToExpressConnectRouter(request: CheckAddRegionToExpressConnectRouterRequest): CheckAddRegionToExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return checkAddRegionToExpressConnectRouterWithOptions(request, runtime);
}

model CreateExpressConnectRouterRequest {
  alibabaSideAsn?: long(name='AlibabaSideAsn', description='The autonomous system number (ASN) of the ECR. Valid values: 45104, 64512 to 65534, and 4200000000 to 4294967294. Default value: 45104. The value 65025 is reserved by Alibaba Cloud.

This parameter is required.', example='45104'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  description?: string(name='Description', description='The description of the ECR.', example='test'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  name?: string(name='Name', description='The name of the ECR.', example='test'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the ECR belongs.', example='rg-acfmvvajg5q****'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 128 characters in length. It cannot start with `aliyun` or `acs:`, and cannot contain `http://` or `https://`.', example='TestKey'),
      value?: string(name='Value', description='The value of the tag. You can specify up to 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.', example='TestValue'),
    }
  ](name='Tag', description='The information about the tags.

You can specify at most 20 tags in each call.'),
}

model CreateExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.Name'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of Name **** is illegal.'),
  ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-fu8rszhgv7623c****'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the ECR is created. Valid values:

*   **true**
*   **false**', example='True'),
}

model CreateExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Creates an Express Connect Router (ECR).
 *
 * @description After you create an ECR, it enters the **Active** state.
 *
 * @param request CreateExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateExpressConnectRouterResponse
 */
async function createExpressConnectRouterWithOptions(request: CreateExpressConnectRouterRequest, runtime: $RuntimeOptions): CreateExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.alibabaSideAsn)) {
    body['AlibabaSideAsn'] = request.alibabaSideAsn;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.resourceGroupId)) {
    body['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!$isNull(request.tag)) {
    body['Tag'] = request.tag;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates an Express Connect Router (ECR).
 *
 * @description After you create an ECR, it enters the **Active** state.
 *
 * @param request CreateExpressConnectRouterRequest
 * @return CreateExpressConnectRouterResponse
 */
async function createExpressConnectRouter(request: CreateExpressConnectRouterRequest): CreateExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return createExpressConnectRouterWithOptions(request, runtime);
}

model CreateExpressConnectRouterAssociationRequest {
  allowedPrefixes?: [ string ](name='AllowedPrefixes', description='The allowed route prefixes.'),
  allowedPrefixesMode?: string(name='AllowedPrefixesMode'),
  associationRegionId?: string(name='AssociationRegionId', description='The region ID of the resource to be associated.

This parameter is required.', example='cn-hangzhou'),
  cenId?: string(name='CenId', description='The ID of the Cloud Enterprise Network (CEN) instance.', example='cen-of3o1the3i4gwb****'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  createAttachment?: boolean(name='CreateAttachment', description='Specifies whether to initiate an association on the TR when the ECR is associated with the TR. Valid values:

*   **true**: You do not need to initiate an association on the TR.
*   **false**: You need to initiate an association on the TR.', example='true'),
  description?: string(name='Description'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  transitRouterId?: string(name='TransitRouterId', description='The TR ID.', example='tr-2ze4i71c6be454e2l****'),
  transitRouterOwnerId?: long(name='TransitRouterOwnerId', description='The ID of the Alibaba Cloud account that owns the TR. Default value: ID of the Alibaba Cloud account that logs in.

>  If you want to connect to a network instance that belongs to a different account, this parameter is required.', example='189159362009****'),
  vpcId?: string(name='VpcId', description='The VPC ID.', example='vpc-bp1h37fchc6jmfyln****'),
  vpcOwnerId?: long(name='VpcOwnerId', description='The ID of the Alibaba Cloud account that owns the VPC. Default value: ID of the Alibaba Cloud account that logs in.

>  If you want to connect to a network instance that belongs to a different account, this parameter is required.', example='132193271328****'),
}

model CreateExpressConnectRouterAssociationResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the VPC or TR.', example='ecr-assoc-9p2qxx5phpca2m****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='05130E79-588D-5C40-A718-C4863A59****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model CreateExpressConnectRouterAssociationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateExpressConnectRouterAssociationResponseBody(name='body'),
}

/**
 * @summary Associates a virtual private cloud (VPC) or a transit router (TR) with an Express Connect router (ECR).
 *
 * @param request CreateExpressConnectRouterAssociationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateExpressConnectRouterAssociationResponse
 */
async function createExpressConnectRouterAssociationWithOptions(request: CreateExpressConnectRouterAssociationRequest, runtime: $RuntimeOptions): CreateExpressConnectRouterAssociationResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.allowedPrefixes)) {
    body['AllowedPrefixes'] = request.allowedPrefixes;
  }
  if (!$isNull(request.allowedPrefixesMode)) {
    body['AllowedPrefixesMode'] = request.allowedPrefixesMode;
  }
  if (!$isNull(request.associationRegionId)) {
    body['AssociationRegionId'] = request.associationRegionId;
  }
  if (!$isNull(request.cenId)) {
    body['CenId'] = request.cenId;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.createAttachment)) {
    body['CreateAttachment'] = request.createAttachment;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.transitRouterId)) {
    body['TransitRouterId'] = request.transitRouterId;
  }
  if (!$isNull(request.transitRouterOwnerId)) {
    body['TransitRouterOwnerId'] = request.transitRouterOwnerId;
  }
  if (!$isNull(request.vpcId)) {
    body['VpcId'] = request.vpcId;
  }
  if (!$isNull(request.vpcOwnerId)) {
    body['VpcOwnerId'] = request.vpcOwnerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateExpressConnectRouterAssociation',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Associates a virtual private cloud (VPC) or a transit router (TR) with an Express Connect router (ECR).
 *
 * @param request CreateExpressConnectRouterAssociationRequest
 * @return CreateExpressConnectRouterAssociationResponse
 */
async function createExpressConnectRouterAssociation(request: CreateExpressConnectRouterAssociationRequest): CreateExpressConnectRouterAssociationResponse {
  var runtime = new $RuntimeOptions{};
  return createExpressConnectRouterAssociationWithOptions(request, runtime);
}

model CreateFlowLogRequest {
  clientToken?: string(name='ClientToken', example='02fb3da4-130e-11e9-8e44-00****'),
  description?: string(name='Description', example='myFlowlog'),
  dryRun?: boolean(name='DryRun', example='false'),
  ecrId?: string(name='EcrId', description='This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  flowLogName?: string(name='FlowLogName', example='myFlowlog'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='vbr-xxx'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='VBR'),
  interval?: int32(name='Interval', example='60'),
  logStoreName?: string(name='LogStoreName', description='This parameter is required.', example='flowlog-logstore'),
  projectName?: string(name='ProjectName', description='This parameter is required.', example='flowlog-project'),
  samplingRate?: string(name='SamplingRate', example='1:4096'),
}

model CreateFlowLogResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', example='Authentication is failed for ****'),
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', example='The param format of EcrId **** is illegal.'),
  flowLogId?: string(name='FlowLogId', example='flowlog-m5evbtbpt****'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', example='True'),
}

model CreateFlowLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateFlowLogResponseBody(name='body'),
}

/**
 * @summary Creates a flow log and enables log delivery.
 *
 * @param request CreateFlowLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateFlowLogResponse
 */
async function createFlowLogWithOptions(request: CreateFlowLogRequest, runtime: $RuntimeOptions): CreateFlowLogResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.logStoreName)) {
    query['LogStoreName'] = request.logStoreName;
  }
  if (!$isNull(request.projectName)) {
    query['ProjectName'] = request.projectName;
  }
  if (!$isNull(request.samplingRate)) {
    query['SamplingRate'] = request.samplingRate;
  }
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.flowLogName)) {
    body['FlowLogName'] = request.flowLogName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateFlowLog',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Creates a flow log and enables log delivery.
 *
 * @param request CreateFlowLogRequest
 * @return CreateFlowLogResponse
 */
async function createFlowLog(request: CreateFlowLogRequest): CreateFlowLogResponse {
  var runtime = new $RuntimeOptions{};
  return createFlowLogWithOptions(request, runtime);
}

model DeactivateFlowLogRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  flowLogId?: string(name='FlowLogId', description='The ID of the flow log.

This parameter is required.', example='flowlog-m5evbtbpt****'),
}

model DeactivateFlowLogResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DeactivateFlowLogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeactivateFlowLogResponseBody(name='body'),
}

/**
 * @summary Disables log delivery.
 *
 * @param request DeactivateFlowLogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeactivateFlowLogResponse
 */
async function deactivateFlowLogWithOptions(request: DeactivateFlowLogRequest, runtime: $RuntimeOptions): DeactivateFlowLogResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.flowLogId)) {
    body['FlowLogId'] = request.flowLogId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeactivateFlowLog',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Disables log delivery.
 *
 * @param request DeactivateFlowLogRequest
 * @return DeactivateFlowLogResponse
 */
async function deactivateFlowLog(request: DeactivateFlowLogRequest): DeactivateFlowLogResponse {
  var runtime = new $RuntimeOptions{};
  return deactivateFlowLogWithOptions(request, runtime);
}

model DeleteExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-fu8rszhgv7623c****'),
}

model DeleteExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DeleteExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Deletes an Express Connect router (ECR).
 *
 * @description Take note of the following items:
 * *   Before you call this operation, make sure that all resources are disassociated from the ECR.
 * *   You can delete only ECRs that are in the **Active** state.
 *
 * @param request DeleteExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteExpressConnectRouterResponse
 */
async function deleteExpressConnectRouterWithOptions(request: DeleteExpressConnectRouterRequest, runtime: $RuntimeOptions): DeleteExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes an Express Connect router (ECR).
 *
 * @description Take note of the following items:
 * *   Before you call this operation, make sure that all resources are disassociated from the ECR.
 * *   You can delete only ECRs that are in the **Active** state.
 *
 * @param request DeleteExpressConnectRouterRequest
 * @return DeleteExpressConnectRouterResponse
 */
async function deleteExpressConnectRouter(request: DeleteExpressConnectRouterRequest): DeleteExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return deleteExpressConnectRouterWithOptions(request, runtime);
}

model DeleteExpressConnectRouterAssociationRequest {
  associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the VPC or TR.

This parameter is required.', example='ecr-assoc-9p2qxx5phpca2m****'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  deleteAttachment?: boolean(name='DeleteAttachment', description='Specifies whether to delete the association between the ECR and the VPC or TR. Valid values:

*   **true**
*   **false**', example='true'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
}

model DeleteExpressConnectRouterAssociationResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='05130E79-588D-5C40-A718-C4863A59****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DeleteExpressConnectRouterAssociationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteExpressConnectRouterAssociationResponseBody(name='body'),
}

/**
 * @summary Disassociates an Express Connect router (ECR) from a virtual private cloud (VPC) or a transit router (TR).
 *
 * @param request DeleteExpressConnectRouterAssociationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteExpressConnectRouterAssociationResponse
 */
async function deleteExpressConnectRouterAssociationWithOptions(request: DeleteExpressConnectRouterAssociationRequest, runtime: $RuntimeOptions): DeleteExpressConnectRouterAssociationResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.associationId)) {
    body['AssociationId'] = request.associationId;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.deleteAttachment)) {
    body['DeleteAttachment'] = request.deleteAttachment;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteExpressConnectRouterAssociation',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Disassociates an Express Connect router (ECR) from a virtual private cloud (VPC) or a transit router (TR).
 *
 * @param request DeleteExpressConnectRouterAssociationRequest
 * @return DeleteExpressConnectRouterAssociationResponse
 */
async function deleteExpressConnectRouterAssociation(request: DeleteExpressConnectRouterAssociationRequest): DeleteExpressConnectRouterAssociationResponse {
  var runtime = new $RuntimeOptions{};
  return deleteExpressConnectRouterAssociationWithOptions(request, runtime);
}

model DeleteFlowlogRequest {
  clientToken?: string(name='ClientToken', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', example='false'),
  ecrId?: string(name='EcrId', description='This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  flowLogId?: string(name='FlowLogId', description='This parameter is required.', example='flowlog-m5evbtbpt****'),
}

model DeleteFlowlogResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', example='Authentication is failed for ****'),
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', example='True'),
}

model DeleteFlowlogResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteFlowlogResponseBody(name='body'),
}

/**
 * @summary 删除流日志
 *
 * @param request DeleteFlowlogRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteFlowlogResponse
 */
async function deleteFlowlogWithOptions(request: DeleteFlowlogRequest, runtime: $RuntimeOptions): DeleteFlowlogResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.flowLogId)) {
    query['FlowLogId'] = request.flowLogId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteFlowlog',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除流日志
 *
 * @param request DeleteFlowlogRequest
 * @return DeleteFlowlogResponse
 */
async function deleteFlowlog(request: DeleteFlowlogRequest): DeleteFlowlogResponse {
  var runtime = new $RuntimeOptions{};
  return deleteFlowlogWithOptions(request, runtime);
}

model DescribeDisabledExpressConnectRouterRouteEntriesRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to read. Valid values: 1 to 2147483647. Default value: 10.', example='10'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values:

*   You do not need to specify this parameter for the first request.
*   You must specify the token that is obtained from the previous query as the value of NextToken.', example='FFv4fzkNPW8Z+cZ+DBXXQ3Gmf3XlCgpBH43oaTYTAAcGc708Zb+pDyAGVJBo/MKsyrtZfPnX9Ztf02vgdIDyaNe8UuZdf/JJk069qxGKzqSKg='),
}

model DescribeDisabledExpressConnectRouterRouteEntriesResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  disabledRouteEntryList?: [ 
    {
      destinationCidrBlock?: string(name='DestinationCidrBlock', description='The destination CIDR block of the route.', example='192.168.100.110/32'),
      ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-mezk2idmsd0vx2****'),
      gmtCreate?: string(name='GmtCreate', description='The time when the route entry was created.', example='1682317345'),
      nexthopInstanceId?: string(name='NexthopInstanceId', description='The ID of the next-hop instance.', example='br-hp3u4u5f03tfuljis****'),
      nexthopInstanceRegionId?: string(name='NexthopInstanceRegionId', description='The region ID of the next-hop instance.', example='cn-hangzhou'),
    }
  ](name='DisabledRouteEntryList', description='The routes that are queried.'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsInstanceId**, the request parameter **DtsInstanceId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  maxResults?: int32(name='MaxResults', description='The total number of entries returned. Valid values: 1 to 2147483647. Default value: 10.', example='6'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If NextToken is empty, no next page exists.
*   If a value of NextToken is returned, the value indicates the token that is used for the next query.', example='gAAAAABkDTaRFnmxUoMLVOn8YTIgYFeL2ch8j0sJs8VCIU8SS5438m3D9X1VqspCcaUEHRN9I_AfVwMhZHAhcNivifK_OtQxJQ=='),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether routes are disabled by the ECR. Valid values:

*   **true**
*   **false**', example='True'),
  totalCount?: int32(name='TotalCount', description='The total number of routes.', example='2'),
}

model DescribeDisabledExpressConnectRouterRouteEntriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDisabledExpressConnectRouterRouteEntriesResponseBody(name='body'),
}

/**
 * @summary Queries the route entries that are disabled on an Express Connect router (ECR).
 *
 * @param request DescribeDisabledExpressConnectRouterRouteEntriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDisabledExpressConnectRouterRouteEntriesResponse
 */
async function describeDisabledExpressConnectRouterRouteEntriesWithOptions(request: DescribeDisabledExpressConnectRouterRouteEntriesRequest, runtime: $RuntimeOptions): DescribeDisabledExpressConnectRouterRouteEntriesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDisabledExpressConnectRouterRouteEntries',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the route entries that are disabled on an Express Connect router (ECR).
 *
 * @param request DescribeDisabledExpressConnectRouterRouteEntriesRequest
 * @return DescribeDisabledExpressConnectRouterRouteEntriesResponse
 */
async function describeDisabledExpressConnectRouterRouteEntries(request: DescribeDisabledExpressConnectRouterRouteEntriesRequest): DescribeDisabledExpressConnectRouterRouteEntriesResponse {
  var runtime = new $RuntimeOptions{};
  return describeDisabledExpressConnectRouterRouteEntriesWithOptions(request, runtime);
}

model DescribeExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-fu8rszhgv7623c****'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to read. Valid values: 1 to 2147483647. Default value: 20.', example='10'),
  name?: string(name='Name', description='The name of the ECR.', example='test'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values:

*   You do not need to specify this parameter for the first request.
*   You must specify the token that is obtained from the previous query as the value of NextToken.', example='e0a2dbeb69a8beeeb8194e92b702df3fd3e7bfe6ce7bfc16e0b5e8707e68181f'),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the ECR belongs.', example='rg-aek2aq7f4va****'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag keys.

The tag keys cannot be an empty string. The tag keys can be up to 64 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`.

You can specify at most 20 tag keys.', example='TestKey'),
      value?: string(name='Value', description='A tag value.

A tag value can be a maximum of 128 characters in length. It cannot contain `http://` or `https://` and cannot start with `acs:`.', example='TestValue'),
    }
  ](name='Tag', description='The resource tags. You can specify up to 20 tags.'),
}

model DescribeExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.Name'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of Name **** is illegal.'),
  ecrList?: [ 
    {
      alibabaSideAsn?: long(name='AlibabaSideAsn', description='The autonomous system number (ASN) of the ECR.', example='45104'),
      bizStatus?: string(name='BizStatus', description='The business state of the ECR. Valid values:

*   **Normal:** The ECR is running as expected.
*   **FinancialLocked**: The ECR is locked due to overdue payments.', example='Normal'),
      description?: string(name='Description', description='The description of the ECR.', example='test'),
      ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-mezk2idmsd0vx2****'),
      gmtCreate?: string(name='GmtCreate', description='The time when the ECR was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.', example='2023-02-16T01:44:50Z'),
      gmtModified?: string(name='GmtModified', description='The time when the ECR was modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.', example='2023-02-16T01:44:50Z'),
      name?: string(name='Name', description='The name of the ECR.', example='test'),
      ownerId?: long(name='OwnerId', description='The ID of the Alibaba Cloud account that owns the ECR.', example='170646818729****'),
      resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the ECR belongs.', example='rg-aekzuscospt****'),
      status?: string(name='Status', description='The deployment state of the ECR. Valid values:

*   **ACTIVE**: The ECR is created.
*   **UPDATING**: The ECR is being modified.
*   **ASSOCIATING**: The ECR is being associated with resources.
*   **DISSOCIATING**: The resource is being disassociated from resources.
*   **LOCKED_ATTACHING**: The ECR is locked because it is being associated with an external system.
*   **LOCKED_DETACHING**: The ECR is locked because it is being disassociated from an external system.
*   **RECLAIMING**: The ECR is waiting to release resources.
*   **DELETING**: The ECR is being deleted.', example='Active'),
      tags?: [ 
        {
          tagKey?: string(name='TagKey', description='The tag key.', example='test'),
          tagValue?: string(name='TagValue', description='The tag value.', example='test'),
        }
      ](name='Tags', description='The tags.'),
    }
  ](name='EcrList', description='The ECRs.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  maxResults?: int32(name='MaxResults', description='The total number of entries returned. Valid values: 1 to 2147483647. Default value: 20.', example='10'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If NextToken is empty, no next page exists.
*   If a value of NextToken is returned, the value indicates the token that is used for the next query.', example='AAAAAdDWBF2w6Olxc+cMPjUtUMpttDGZkffvHCfhBKKNEyCVaq+WUEzuUWpp9+QOApNf6g=='),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
  totalCount?: int32(name='TotalCount', description='The total number of ECRs.', example='2'),
}

model DescribeExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Queries a list of Express Connect routers (ECRs).
 *
 * @param request DescribeExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterResponse
 */
async function describeExpressConnectRouterWithOptions(request: DescribeExpressConnectRouterRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!$isNull(request.resourceGroupId)) {
    body['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!$isNull(request.tag)) {
    body['Tag'] = request.tag;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of Express Connect routers (ECRs).
 *
 * @param request DescribeExpressConnectRouterRequest
 * @return DescribeExpressConnectRouterResponse
 */
async function describeExpressConnectRouter(request: DescribeExpressConnectRouterRequest): DescribeExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterWithOptions(request, runtime);
}

model DescribeExpressConnectRouterAllowedPrefixHistoryRequest {
  associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the virtual private cloud (VPC) or transit router (TR).

>  You must specify either **InstanceId** or **AssociationId**.', example='ecr-assoc-9p2qxx5phpca2m****'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  instanceId?: string(name='InstanceId', description='The ID of the network instance that is associated with the ECR.

>  You must specify either **InstanceId** or **AssociationId**.', example='vbr-j6cwxhgg0s5nuephp****'),
  instanceType?: string(name='InstanceType', description='The type of the network instance. Valid values:

*   **VPC**
*   **TR**', example='VPC'),
}

model DescribeExpressConnectRouterAllowedPrefixHistoryResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  allowedPrefixHistoryList?: [ 
    {
      allowedPrefix?: [ string ](name='AllowedPrefix', description='The route prefix.'),
      gmtCreate?: string(name='GmtCreate', description='The time when the historical route prefix entry was created.', example='1673751163000'),
    }
  ](name='AllowedPrefixHistoryList', description='The historical route prefixes.'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DescribeExpressConnectRouterAllowedPrefixHistoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterAllowedPrefixHistoryResponseBody(name='body'),
}

/**
 * @summary Queries the historical route prefixes of an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterAllowedPrefixHistoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterAllowedPrefixHistoryResponse
 */
async function describeExpressConnectRouterAllowedPrefixHistoryWithOptions(request: DescribeExpressConnectRouterAllowedPrefixHistoryRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterAllowedPrefixHistoryResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.associationId)) {
    body['AssociationId'] = request.associationId;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouterAllowedPrefixHistory',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the historical route prefixes of an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterAllowedPrefixHistoryRequest
 * @return DescribeExpressConnectRouterAllowedPrefixHistoryResponse
 */
async function describeExpressConnectRouterAllowedPrefixHistory(request: DescribeExpressConnectRouterAllowedPrefixHistoryRequest): DescribeExpressConnectRouterAllowedPrefixHistoryResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterAllowedPrefixHistoryWithOptions(request, runtime);
}

model DescribeExpressConnectRouterAssociationRequest {
  associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the VPC or TR.', example='ecr-assoc-9p2qxx5phpca2m****'),
  associationNodeType?: string(name='AssociationNodeType', description='The type of the associated resource. Valid values:

*   **VPC**
*   **TR**', example='VPC'),
  associationRegionId?: string(name='AssociationRegionId', description='The region ID of the VPC or TR.', example='cn-hangzhou'),
  cenId?: string(name='CenId', description='The ID of the Cloud Enterprise Network (CEN) instance.', example='cen-of3o1the3i4gwb****'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to read. Valid values: 1 to 2147483647. Default value: 20.', example='10'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values:

*   You do not need to specify this parameter for the first request.
*   You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
  transitRouterId?: string(name='TransitRouterId', description='The TR ID.', example='tr-2ze4i71c6be454e2l****'),
  vpcId?: string(name='VpcId', description='The VPC ID.', example='vpc-bp1h37fchc6jmfyln****'),
}

model DescribeExpressConnectRouterAssociationResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  associationList?: [ 
    {
      allowedPrefixes?: [ string ](name='AllowedPrefixes', description='The allowed route prefixes.'),
      allowedPrefixesMode?: string(name='AllowedPrefixesMode'),
      associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the VPC or TR.', example='ecr-assoc-9p2qxx5phpca2m****'),
      associationNodeType?: string(name='AssociationNodeType', description='The type of the associated resource. Valid values:

*   **VPC**
*   **TR**', example='VPC'),
      cenId?: string(name='CenId', description='The ID of the CEN instance.', example='cen-5510frtx8zi54q****'),
      description?: string(name='Description'),
      ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-fu8rszhgv7623c****'),
      gmtCreate?: string(name='GmtCreate', description='The time when the association was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.', example='2024-01-09T12:18:23Z'),
      gmtModified?: string(name='GmtModified', description='The time when the association was modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.', example='2024-01-09T12:18:23Z'),
      ownerId?: long(name='OwnerId', description='The ID of the Alibaba Cloud account that owns the resource.', example='167509154715****'),
      regionId?: string(name='RegionId', description='The region ID of the resource.', example='cn-hangzhou'),
      status?: string(name='Status', description='The deployment state of the associated resource. Valid values:

*   **CREATING**: The resource is being created.
*   **ACTIVE**: The resource is created.
*   **INACTIVE**: The TR is pending to be associated with the ECR.
*   **ASSOCIATING**: The resource is being associated.
*   **DISSOCIATING**: The resource is being disassociated.
*   **UPDATING**: The resource is being modified.
*   **DELETING**: The resource is being deleted.', example='ACTIVE'),
      transitRouterId?: string(name='TransitRouterId', description='The TR ID.', example='tr-2ze4i71c6be454e2l****'),
      transitRouterOwnerId?: long(name='TransitRouterOwnerId', description='The ID of the Alibaba Cloud account that owns the TR.', example='189159362009****'),
      vpcId?: string(name='VpcId', description='The VPC ID.', example='vpc-2zeeaxet4i2j1a7n7****'),
      vpcOwnerId?: long(name='VpcOwnerId', description='The ID of the Alibaba Cloud account to which the VPC belongs.', example='146757288406****'),
    }
  ](name='AssociationList', description='The associated resources.'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of DynamicMessage is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  maxResults?: int32(name='MaxResults', description='The total number of entries returned. Valid values: 1 to 2147483647. Default value: 20.', example='20'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If **NextToken** is empty, no next page exists.
*   If a value of **NextToken** is returned, the value indicates the token that is used for the next query.', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
  requestId?: string(name='RequestId', description='The request ID.', example='05130E79-588D-5C40-A718-C4863A59****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
  totalCount?: int32(name='TotalCount', description='The total number of associated resources.', example='1'),
}

model DescribeExpressConnectRouterAssociationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterAssociationResponseBody(name='body'),
}

/**
 * @summary Queries the virtual private clouds (VPCs) and transit routers (TRs) associated with an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterAssociationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterAssociationResponse
 */
async function describeExpressConnectRouterAssociationWithOptions(request: DescribeExpressConnectRouterAssociationRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterAssociationResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.associationId)) {
    body['AssociationId'] = request.associationId;
  }
  if (!$isNull(request.associationNodeType)) {
    body['AssociationNodeType'] = request.associationNodeType;
  }
  if (!$isNull(request.associationRegionId)) {
    body['AssociationRegionId'] = request.associationRegionId;
  }
  if (!$isNull(request.cenId)) {
    body['CenId'] = request.cenId;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!$isNull(request.transitRouterId)) {
    body['TransitRouterId'] = request.transitRouterId;
  }
  if (!$isNull(request.vpcId)) {
    body['VpcId'] = request.vpcId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouterAssociation',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the virtual private clouds (VPCs) and transit routers (TRs) associated with an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterAssociationRequest
 * @return DescribeExpressConnectRouterAssociationResponse
 */
async function describeExpressConnectRouterAssociation(request: DescribeExpressConnectRouterAssociationRequest): DescribeExpressConnectRouterAssociationResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterAssociationWithOptions(request, runtime);
}

model DescribeExpressConnectRouterChildInstanceRequest {
  associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the virtual private cloud (VPC) or transit router (TR).', example='ecr-assoc-9p2qxx5phpca2m****'),
  childInstanceId?: string(name='ChildInstanceId', description='The ID of the network instance to be queried.', example='vbr-j6cwxhgg0s5nuephp****'),
  childInstanceRegionId?: string(name='ChildInstanceRegionId', description='The region ID of the network instance.', example='cn-hangzhou'),
  childInstanceType?: string(name='ChildInstanceType', description='The type of network instance. Set the value to VBR.', example='VBR'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to read. Valid values: 1 to 2147483647. Default value: 20.', example='10'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If NextToken is empty, no next page exists.
*   If a value of NextToken is returned, the value indicates the token that is used for the next query.', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
}

model DescribeExpressConnectRouterChildInstanceResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  childInstanceList?: [ 
    {
      associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the VPC or TR.', example='ecr-assoc-9p2qxx5phpca2m****'),
      childInstanceId?: string(name='ChildInstanceId', description='The VBR ID.', example='vbr-gw8vjq2zjux3ifsc9****'),
      childInstanceOwnerId?: long(name='ChildInstanceOwnerId', description='The ID of the Alibaba Cloud account that owns the VBR.', example='112101171212****'),
      childInstanceRegionId?: string(name='ChildInstanceRegionId', description='The region ID of the VBR.', example='cn-hangzhou'),
      childInstanceType?: string(name='ChildInstanceType', description='The type of the VBR. The value is **VBR**.', example='VBR'),
      description?: string(name='Description', description='The description of the ECR.', example='test'),
      ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-mezk2idmsd0vx2****'),
      gmtCreate?: string(name='GmtCreate', description='The time when the association was created. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.', example='2024-01-09T12:18:23Z'),
      gmtModified?: string(name='GmtModified', description='The time when the association was modified. The time follows the ISO 8601 standard in the YYYY-MM-DDThh:mm:ssZ format. The time is displayed in UTC.', example='2024-01-09T12:18:23Z'),
      ownerId?: long(name='OwnerId', description='The ID of the Alibaba Cloud account that owns the VBR.', example='167509154715****'),
      regionId?: string(name='RegionId', description='The region ID of the VBR.', example='cn-hangzhou'),
      status?: string(name='Status', description='The deployment state of the associated resource. Valid values:

- **CREATING**: The resource is being created.
- **ACTIVE**: The resource is created.
- **ASSOCIATING**: The resource is being associated.
- **DISSOCIATING**: The resource is being disassociated.
- **UPDATING**: The resource is being modified.
- **DELETING**: The resource is being deleted.', example='ACTIVE'),
    }
  ](name='ChildInstanceList', description='The VBRs.'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  maxResults?: int32(name='MaxResults', description='The total number of entries returned. Valid values: 1 to 2147483647. Default value: 20.', example='20'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If **NextToken** is empty, no next page exists.
*   If a value of **NextToken** is returned, the value indicates the token that is used for the next query.', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
  requestId?: string(name='RequestId', description='The request ID.', example='05130E79-588D-5C40-A718-C4863A59****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
  totalCount?: int32(name='TotalCount', description='The total number of associated resources.', example='1'),
}

model DescribeExpressConnectRouterChildInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterChildInstanceResponseBody(name='body'),
}

/**
 * @summary Queries the virtual border routers (VBRs) that are associated with an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterChildInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterChildInstanceResponse
 */
async function describeExpressConnectRouterChildInstanceWithOptions(request: DescribeExpressConnectRouterChildInstanceRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterChildInstanceResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.associationId)) {
    body['AssociationId'] = request.associationId;
  }
  if (!$isNull(request.childInstanceId)) {
    body['ChildInstanceId'] = request.childInstanceId;
  }
  if (!$isNull(request.childInstanceRegionId)) {
    body['ChildInstanceRegionId'] = request.childInstanceRegionId;
  }
  if (!$isNull(request.childInstanceType)) {
    body['ChildInstanceType'] = request.childInstanceType;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouterChildInstance',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the virtual border routers (VBRs) that are associated with an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterChildInstanceRequest
 * @return DescribeExpressConnectRouterChildInstanceResponse
 */
async function describeExpressConnectRouterChildInstance(request: DescribeExpressConnectRouterChildInstanceRequest): DescribeExpressConnectRouterChildInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterChildInstanceWithOptions(request, runtime);
}

model DescribeExpressConnectRouterInterRegionTransitModeRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
}

model DescribeExpressConnectRouterInterRegionTransitModeResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  interRegionTransitModeList?: [ 
    {
      mode?: string(name='Mode', description='The cross-region forwarding mode of the ECR. Valid values:

*   **ECMP**: the load balancing mode.
*   **NearBy**: the nearby forwarding mode.', example='ECMP'),
      regionId?: string(name='RegionId', description='The region ID of the ECR.', example='cn-hangzhou'),
    }
  ](name='InterRegionTransitModeList', description='The cross-region forwarding modes.'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DescribeExpressConnectRouterInterRegionTransitModeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterInterRegionTransitModeResponseBody(name='body'),
}

/**
 * @summary Queries the cross-region forwarding modes of an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterInterRegionTransitModeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterInterRegionTransitModeResponse
 */
async function describeExpressConnectRouterInterRegionTransitModeWithOptions(request: DescribeExpressConnectRouterInterRegionTransitModeRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterInterRegionTransitModeResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouterInterRegionTransitMode',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the cross-region forwarding modes of an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterInterRegionTransitModeRequest
 * @return DescribeExpressConnectRouterInterRegionTransitModeResponse
 */
async function describeExpressConnectRouterInterRegionTransitMode(request: DescribeExpressConnectRouterInterRegionTransitModeRequest): DescribeExpressConnectRouterInterRegionTransitModeResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterInterRegionTransitModeWithOptions(request, runtime);
}

model DescribeExpressConnectRouterRegionRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   true: performs only a dry run.
*   false (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ID of the ECR that you want to query.

This parameter is required.', example='ecr-fu8rszhgv7623c****'),
}

model DescribeExpressConnectRouterRegionResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  regionIdList?: [ string ](name='RegionIdList', description='The region in which the ECR feature is activated.'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DescribeExpressConnectRouterRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterRegionResponseBody(name='body'),
}

/**
 * @summary Queries a list of regions in which resources related to an Express Connect router (ECR) are deployed.
 *
 * @param request DescribeExpressConnectRouterRegionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterRegionResponse
 */
async function describeExpressConnectRouterRegionWithOptions(request: DescribeExpressConnectRouterRegionRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterRegionResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouterRegion',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of regions in which resources related to an Express Connect router (ECR) are deployed.
 *
 * @param request DescribeExpressConnectRouterRegionRequest
 * @return DescribeExpressConnectRouterRegionResponse
 */
async function describeExpressConnectRouterRegion(request: DescribeExpressConnectRouterRegionRequest): DescribeExpressConnectRouterRegionResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterRegionWithOptions(request, runtime);
}

model DescribeExpressConnectRouterRouteEntriesRequest {
  asPath?: string(name='AsPath', description='The Autonomous System (AS) path of the route.', example='[64993,64512]'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  community?: string(name='Community', description='The community value that is carried in the Border Gateway Protocol (BGP) route.', example='9001:9263'),
  destinationCidrBlock?: string(name='DestinationCidrBlock', description='The destination CIDR block of the route that you want to query.', example='172.20.47.0/24'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to read. Valid values: 1 to 2147483647. Default value: 10.', example='10'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values:

*   You do not need to specify this parameter for the first request.
*   You must specify the token that is obtained from the previous query as the value of NextToken.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  nexthopInstanceId?: string(name='NexthopInstanceId', description='The ID of the next-hop instance.', example='br-hp3u4u5f03tfuljis****'),
  queryRegionId?: string(name='QueryRegionId', description='The region ID of the ECR.', example='cn-hangzhou'),
}

model DescribeExpressConnectRouterRouteEntriesResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  maxResults?: int32(name='MaxResults', description='The total number of entries returned. Valid values: 1 to 2147483647. Default value: 10', example='6'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If **NextToken** is empty, no next page exists.
*   If a value of **NextToken** is returned, the value indicates the token that is used for the next query.', example='gAAAAABkWwFTUMNCdWC0VMYOIylA56Hx6JUfCZlk5hQ5g_fnKmetN6303tqq5UJ2ouJzyT2fDOdzb-NqyEB5jcY8Z2euX7qHDA=='),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  routeEntriesList?: [ 
    {
      asPath?: string(name='AsPath', description='The AS path of the route.', example='[64993,64512]'),
      community?: string(name='Community', description='The community value that is carried in the BGP route.', example='9001:9263'),
      destinationCidrBlock?: string(name='DestinationCidrBlock', description='The destination CIDR block of the route.', example='192.168.0.0/16'),
      med?: long(name='Med'),
      nexthopInstanceId?: string(name='NexthopInstanceId', description='The ID of the next-hop instance.', example='br-hp3u4u5f03tfuljis****'),
      nexthopInstanceRegionId?: string(name='NexthopInstanceRegionId', description='The region ID of the next-hop instance.', example='cn-hangzhou'),
      status?: string(name='Status', description='The state of the ECR.', example='ACTIVE'),
    }
  ](name='RouteEntriesList', description='The route entries.'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
  totalCount?: int32(name='TotalCount', description='The total number of route entries.', example='2'),
}

model DescribeExpressConnectRouterRouteEntriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExpressConnectRouterRouteEntriesResponseBody(name='body'),
}

/**
 * @summary Queries the route entries of an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterRouteEntriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExpressConnectRouterRouteEntriesResponse
 */
async function describeExpressConnectRouterRouteEntriesWithOptions(request: DescribeExpressConnectRouterRouteEntriesRequest, runtime: $RuntimeOptions): DescribeExpressConnectRouterRouteEntriesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.asPath)) {
    body['AsPath'] = request.asPath;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.community)) {
    body['Community'] = request.community;
  }
  if (!$isNull(request.destinationCidrBlock)) {
    body['DestinationCidrBlock'] = request.destinationCidrBlock;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!$isNull(request.nexthopInstanceId)) {
    body['NexthopInstanceId'] = request.nexthopInstanceId;
  }
  if (!$isNull(request.queryRegionId)) {
    body['QueryRegionId'] = request.queryRegionId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExpressConnectRouterRouteEntries',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the route entries of an Express Connect router (ECR).
 *
 * @param request DescribeExpressConnectRouterRouteEntriesRequest
 * @return DescribeExpressConnectRouterRouteEntriesResponse
 */
async function describeExpressConnectRouterRouteEntries(request: DescribeExpressConnectRouterRouteEntriesRequest): DescribeExpressConnectRouterRouteEntriesResponse {
  var runtime = new $RuntimeOptions{};
  return describeExpressConnectRouterRouteEntriesWithOptions(request, runtime);
}

model DescribeFlowLogsRequest {
  clientToken?: string(name='ClientToken', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', example='true'),
  ecrId?: string(name='EcrId', description='This parameter is required.', example='ecr-a5xqrgbeidz1w8****'),
  flowLogId?: string(name='FlowLogId', example='flowlog-jqnr0veifo5d****'),
  flowLogName?: string(name='FlowLogName', example='same-flowlog'),
  instanceId?: string(name='InstanceId', example='vbr-j6cwxhgg0s5nuephp****'),
  logStoreName?: string(name='LogStoreName', example='myFlowlog'),
  maxResults?: int32(name='MaxResults', example='10'),
  nextToken?: string(name='NextToken', example='gAAAAABkWw*******'),
  projectName?: string(name='ProjectName', example='myFlowlog'),
}

model DescribeFlowLogsResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', example='Authentication is failed for ****'),
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', example='The param format of EcrId **** is illegal.'),
  flowLogs?: [ 
    {
      creationTime?: string(name='CreationTime', example='2023-09-21T04:20Z'),
      description?: string(name='Description', example='myFlowlog'),
      ecrId?: string(name='EcrId', example='ecr-h4cop1khw98*****'),
      flowLogId?: string(name='FlowLogId', example='flowlog-leypqehtgtia2*****'),
      flowLogName?: string(name='FlowLogName', example='myFlowlog'),
      instanceId?: string(name='InstanceId', example='vbr-9dpty76irpf4u15*****'),
      instanceType?: string(name='InstanceType', example='VBR'),
      interval?: int32(name='Interval', example='600'),
      logStoreName?: string(name='LogStoreName', example='FlowLogStore'),
      projectName?: string(name='ProjectName', example='FlowLogProject'),
      regionId?: string(name='RegionId', example='cn-shanghai'),
      resourceGroupId?: string(name='ResourceGroupId', example='rg-aekzb3xwrexc4ry'),
      samplingRate?: string(name='SamplingRate', example='1:4096'),
      slsRegionId?: string(name='SlsRegionId', example='cn-hangzhou'),
      status?: string(name='Status', example='Active'),
      tags?: [ 
        {
          key?: string(name='Key', example='TagKey'),
          value?: string(name='Value', example='TagValue'),
        }
      ](name='Tags'),
    }
  ](name='FlowLogs'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  maxResults?: int32(name='MaxResults', example='10'),
  message?: string(name='Message', example='OK'),
  nextToken?: string(name='NextToken', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
  requestId?: string(name='RequestId', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', example='True'),
  totalCount?: int32(name='TotalCount', example='11'),
}

model DescribeFlowLogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFlowLogsResponseBody(name='body'),
}

/**
 * @summary 查询流日志
 *
 * @param request DescribeFlowLogsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFlowLogsResponse
 */
async function describeFlowLogsWithOptions(request: DescribeFlowLogsRequest, runtime: $RuntimeOptions): DescribeFlowLogsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.flowLogId)) {
    query['FlowLogId'] = request.flowLogId;
  }
  if (!$isNull(request.flowLogName)) {
    query['FlowLogName'] = request.flowLogName;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.logStoreName)) {
    query['LogStoreName'] = request.logStoreName;
  }
  if (!$isNull(request.maxResults)) {
    query['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    query['NextToken'] = request.nextToken;
  }
  if (!$isNull(request.projectName)) {
    query['ProjectName'] = request.projectName;
  }
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeFlowLogs',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询流日志
 *
 * @param request DescribeFlowLogsRequest
 * @return DescribeFlowLogsResponse
 */
async function describeFlowLogs(request: DescribeFlowLogsRequest): DescribeFlowLogsResponse {
  var runtime = new $RuntimeOptions{};
  return describeFlowLogsWithOptions(request, runtime);
}

model DescribeInstanceGrantedToExpressConnectRouterRequest {
  callerType?: string(name='CallerType'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  instanceId?: string(name='InstanceId', description='The ID of the network instance.', example='vbr-j6cwxhgg0s5nuephp****'),
  instanceOwnerId?: long(name='InstanceOwnerId', description='The ID of the Alibaba Cloud account that owns the network instance.', example='129845258050****'),
  instanceRegionId?: string(name='InstanceRegionId', description='The region ID of the network instance.', example='cn-hangzhou'),
  instanceType?: string(name='InstanceType', description='The type of the network instance. Valid values:

*   **VBR**
*   **VPC**', example='VBR'),
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to read. Valid values: 1 to 2147483647. Default value: 20.', example='6'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values:

*   You do not need to specify this parameter for the first request.
*   You must specify the token that is obtained from the previous query as the value of NextToken.', example='gAAAAABkyGzFbZR2NnxnyVk0EiL7F3qMBtBim8Es0mugRT3qb8yEHAMaHGanzuaHUmiEq9QRmok0RgxJAINBOJZa5KPjopEu_Q=='),
  resourceGroupId?: string(name='ResourceGroupId', description='The ID of the resource group to which the network instance belongs.', example='rg-aek2tsvbnfe****'),
  tagModels?: [ 
    {
      tagKey?: string(name='TagKey', description='The tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string.

The tag key can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `acs:` or `aliyun`.', example='key'),
      tagValue?: string(name='TagValue', description='The tag value. You can specify up to 20 tag values. The tag value cannot be an empty string.

The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `acs:` or `aliyun`.', example='value'),
    }
  ](name='TagModels', description='The tags.'),
}

model DescribeInstanceGrantedToExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.Name'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of Name **** is illegal.'),
  ecrGrantedInstanceList?: [ 
    {
      ecrId?: string(name='EcrId', description='The ECR ID.', example='ecr-mezk2idmsd0vx2****'),
      ecrOwnerAliUid?: string(name='EcrOwnerAliUid'),
      gmtCreate?: string(name='GmtCreate', description='The time when the network instance was created.', example='1669023139000'),
      gmtModified?: string(name='GmtModified', description='The time when the network instance was modified.', example='1669023139000'),
      grantId?: string(name='GrantId', description='The authorization ID.', example='gr-8gdelo13mi99g1****'),
      nodeId?: string(name='NodeId', description='The ID of the network instance.', example='vbr-j6cwxhgg0s5nuephp****'),
      nodeOwnerBid?: string(name='NodeOwnerBid', description='The ID of the Alibaba Cloud enterprise account that owns the network instance.', example='26842'),
      nodeOwnerUid?: long(name='NodeOwnerUid', description='The ID of the Alibaba Cloud account that owns the network instance.', example='129845258050****'),
      nodeRegionId?: string(name='NodeRegionId', description='The region ID of the network instance.', example='cn-hangzhou'),
      nodeType?: string(name='NodeType', description='The type of the network instance. Valid values:

*   **VBR**
*   **VPC**', example='VBR'),
      status?: string(name='Status', description='The state of the network instance.', example='Active'),
    }
  ](name='EcrGrantedInstanceList', description='The network instances whose permissions are granted to the ECR.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  maxResults?: int32(name='MaxResults', description='The total number of entries returned. Valid values: 1 to 2147483647. Default value: 20.', example='6'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If **NextToken** is empty, no next page exists.
*   If a value of **NextToken** is returned, the value indicates the token that is used for the next query.', example='FFlMqGuJ10uN3l+FX/cBrGDNXUOUifNeOuAJlT4dc3vsWD6DsNSFAC2FtpeH5QOSG2WFdyRoun7gSLCm5o69YnAQ=='),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
  totalCount?: int32(name='TotalCount', description='The total number of network instances whose permissions are granted to the ECR.', example='10'),
}

model DescribeInstanceGrantedToExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeInstanceGrantedToExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Queries the network instances whose permissions are granted to an Express Connect router (ECR).
 *
 * @param request DescribeInstanceGrantedToExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeInstanceGrantedToExpressConnectRouterResponse
 */
async function describeInstanceGrantedToExpressConnectRouterWithOptions(request: DescribeInstanceGrantedToExpressConnectRouterRequest, runtime: $RuntimeOptions): DescribeInstanceGrantedToExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.callerType)) {
    body['CallerType'] = request.callerType;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceOwnerId)) {
    body['InstanceOwnerId'] = request.instanceOwnerId;
  }
  if (!$isNull(request.instanceRegionId)) {
    body['InstanceRegionId'] = request.instanceRegionId;
  }
  if (!$isNull(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!$isNull(request.resourceGroupId)) {
    body['ResourceGroupId'] = request.resourceGroupId;
  }
  if (!$isNull(request.tagModels)) {
    body['TagModels'] = request.tagModels;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeInstanceGrantedToExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the network instances whose permissions are granted to an Express Connect router (ECR).
 *
 * @param request DescribeInstanceGrantedToExpressConnectRouterRequest
 * @return DescribeInstanceGrantedToExpressConnectRouterResponse
 */
async function describeInstanceGrantedToExpressConnectRouter(request: DescribeInstanceGrantedToExpressConnectRouterRequest): DescribeInstanceGrantedToExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return describeInstanceGrantedToExpressConnectRouterWithOptions(request, runtime);
}

model DetachExpressConnectRouterChildInstanceRequest {
  childInstanceId?: string(name='ChildInstanceId', description='The VBR ID.

This parameter is required.', example='vbr-j6cwxhgg0s5nuephp****'),
  childInstanceType?: string(name='ChildInstanceType', description='The type of the network instance. Set the value to **VBR**.

This parameter is required.', example='VBR'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
}

model DetachExpressConnectRouterChildInstanceResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DetachExpressConnectRouterChildInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DetachExpressConnectRouterChildInstanceResponseBody(name='body'),
}

/**
 * @summary Disassociates a virtual border router (VBR) from an Express Connect router (ECR).
 *
 * @description Before you call the **DetachExpressConnectRouterChildInstance** operation to uninstall a VBR from an ECR, make sure that the ECR is in the **Active** state.
 *
 * @param request DetachExpressConnectRouterChildInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DetachExpressConnectRouterChildInstanceResponse
 */
async function detachExpressConnectRouterChildInstanceWithOptions(request: DetachExpressConnectRouterChildInstanceRequest, runtime: $RuntimeOptions): DetachExpressConnectRouterChildInstanceResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.childInstanceId)) {
    body['ChildInstanceId'] = request.childInstanceId;
  }
  if (!$isNull(request.childInstanceType)) {
    body['ChildInstanceType'] = request.childInstanceType;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DetachExpressConnectRouterChildInstance',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Disassociates a virtual border router (VBR) from an Express Connect router (ECR).
 *
 * @description Before you call the **DetachExpressConnectRouterChildInstance** operation to uninstall a VBR from an ECR, make sure that the ECR is in the **Active** state.
 *
 * @param request DetachExpressConnectRouterChildInstanceRequest
 * @return DetachExpressConnectRouterChildInstanceResponse
 */
async function detachExpressConnectRouterChildInstance(request: DetachExpressConnectRouterChildInstanceRequest): DetachExpressConnectRouterChildInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return detachExpressConnectRouterChildInstanceWithOptions(request, runtime);
}

model DisableExpressConnectRouterRouteEntriesRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  destinationCidrBlock?: string(name='DestinationCidrBlock', description='The destination CIDR block of the route entry in the route table of the ECR.

This parameter is required.', example='10.153.32.16/28'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  nexthopInstanceId?: string(name='NexthopInstanceId', description='The ID of the next-hop instance.

This parameter is required.', example='tr-hp3u4u5f03tfuljis****'),
}

model DisableExpressConnectRouterRouteEntriesResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model DisableExpressConnectRouterRouteEntriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DisableExpressConnectRouterRouteEntriesResponseBody(name='body'),
}

/**
 * @summary Disables route entries of an Express Connect router (ECR).
 *
 * @param request DisableExpressConnectRouterRouteEntriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DisableExpressConnectRouterRouteEntriesResponse
 */
async function disableExpressConnectRouterRouteEntriesWithOptions(request: DisableExpressConnectRouterRouteEntriesRequest, runtime: $RuntimeOptions): DisableExpressConnectRouterRouteEntriesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.destinationCidrBlock)) {
    body['DestinationCidrBlock'] = request.destinationCidrBlock;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.nexthopInstanceId)) {
    body['NexthopInstanceId'] = request.nexthopInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DisableExpressConnectRouterRouteEntries',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Disables route entries of an Express Connect router (ECR).
 *
 * @param request DisableExpressConnectRouterRouteEntriesRequest
 * @return DisableExpressConnectRouterRouteEntriesResponse
 */
async function disableExpressConnectRouterRouteEntries(request: DisableExpressConnectRouterRouteEntriesRequest): DisableExpressConnectRouterRouteEntriesResponse {
  var runtime = new $RuntimeOptions{};
  return disableExpressConnectRouterRouteEntriesWithOptions(request, runtime);
}

model EnableExpressConnectRouterRouteEntriesRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  destinationCidrBlock?: string(name='DestinationCidrBlock', description='The destination CIDR block of the route entry in the route table of the ECR.

This parameter is required.', example='10.153.32.16/28'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  nexthopInstanceId?: string(name='NexthopInstanceId', description='The ID of the next-hop instance.

This parameter is required.', example='tr-hp3u4u5f03tfuljis****'),
}

model EnableExpressConnectRouterRouteEntriesResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model EnableExpressConnectRouterRouteEntriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: EnableExpressConnectRouterRouteEntriesResponseBody(name='body'),
}

/**
 * @summary Enables route entries of an Express Connect router (ECR).
 *
 * @param request EnableExpressConnectRouterRouteEntriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return EnableExpressConnectRouterRouteEntriesResponse
 */
async function enableExpressConnectRouterRouteEntriesWithOptions(request: EnableExpressConnectRouterRouteEntriesRequest, runtime: $RuntimeOptions): EnableExpressConnectRouterRouteEntriesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.destinationCidrBlock)) {
    body['DestinationCidrBlock'] = request.destinationCidrBlock;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.nexthopInstanceId)) {
    body['NexthopInstanceId'] = request.nexthopInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'EnableExpressConnectRouterRouteEntries',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Enables route entries of an Express Connect router (ECR).
 *
 * @param request EnableExpressConnectRouterRouteEntriesRequest
 * @return EnableExpressConnectRouterRouteEntriesResponse
 */
async function enableExpressConnectRouterRouteEntries(request: EnableExpressConnectRouterRouteEntriesRequest): EnableExpressConnectRouterRouteEntriesResponse {
  var runtime = new $RuntimeOptions{};
  return enableExpressConnectRouterRouteEntriesWithOptions(request, runtime);
}

model ForceDeleteExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-fu8rszhgv7623c****'),
}

model ForceDeleteExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model ForceDeleteExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ForceDeleteExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Deletes an Express Connect router (ECR) and disassociates the virtual private cloud (VPC), transit router (TR), and virtual border router (VBR) associated with the ECR.
 *
 * @description *   If you forcefully delete an ECR, all the resources associated with the ECR are disassociated at a time. Make sure that the disassociation does not affect the stability of your business.
 * *   You can delete only ECRs that are in the **Active** state.
 *
 * @param request ForceDeleteExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ForceDeleteExpressConnectRouterResponse
 */
async function forceDeleteExpressConnectRouterWithOptions(request: ForceDeleteExpressConnectRouterRequest, runtime: $RuntimeOptions): ForceDeleteExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ForceDeleteExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes an Express Connect router (ECR) and disassociates the virtual private cloud (VPC), transit router (TR), and virtual border router (VBR) associated with the ECR.
 *
 * @description *   If you forcefully delete an ECR, all the resources associated with the ECR are disassociated at a time. Make sure that the disassociation does not affect the stability of your business.
 * *   You can delete only ECRs that are in the **Active** state.
 *
 * @param request ForceDeleteExpressConnectRouterRequest
 * @return ForceDeleteExpressConnectRouterResponse
 */
async function forceDeleteExpressConnectRouter(request: ForceDeleteExpressConnectRouterRequest): ForceDeleteExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return forceDeleteExpressConnectRouterWithOptions(request, runtime);
}

model GrantInstanceToExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  ecrOwnerAliUid?: long(name='EcrOwnerAliUid', description='The ID of the Alibaba Cloud account that owns the ECR to which you want to grant permissions.

This parameter is required.', example='121012345612****'),
  instanceId?: string(name='InstanceId', description='The ID of the network instance.

This parameter is required.', example='vbr-j6cwxhgg0s5nuephp****'),
  instanceRegionId?: string(name='InstanceRegionId', description='The region ID of the network instance.

This parameter is required.', example='cn-hangzhou'),
  instanceType?: string(name='InstanceType', description='The type of the network instance. Valid values:

*   **VBR**
*   **VPC**

This parameter is required.', example='VBR'),
}

model GrantInstanceToExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model GrantInstanceToExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GrantInstanceToExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Grants permissions on a virtual private cloud (VPC) or a virtual border router (VBR) to an Express Connect router (ECR) of another account.
 *
 * @description When you associate a network instance of another account with an ECR, you must grant permissions on the network instance to the ECR.
 *
 * @param request GrantInstanceToExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GrantInstanceToExpressConnectRouterResponse
 */
async function grantInstanceToExpressConnectRouterWithOptions(request: GrantInstanceToExpressConnectRouterRequest, runtime: $RuntimeOptions): GrantInstanceToExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.ecrOwnerAliUid)) {
    body['EcrOwnerAliUid'] = request.ecrOwnerAliUid;
  }
  if (!$isNull(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceRegionId)) {
    body['InstanceRegionId'] = request.instanceRegionId;
  }
  if (!$isNull(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'GrantInstanceToExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Grants permissions on a virtual private cloud (VPC) or a virtual border router (VBR) to an Express Connect router (ECR) of another account.
 *
 * @description When you associate a network instance of another account with an ECR, you must grant permissions on the network instance to the ECR.
 *
 * @param request GrantInstanceToExpressConnectRouterRequest
 * @return GrantInstanceToExpressConnectRouterResponse
 */
async function grantInstanceToExpressConnectRouter(request: GrantInstanceToExpressConnectRouterRequest): GrantInstanceToExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return grantInstanceToExpressConnectRouterWithOptions(request, runtime);
}

model ListExpressConnectRouterSupportedRegionRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  nodeType?: string(name='NodeType', description='The type of the network instance. Valid values:

*   **TR**
*   **VBR**
*   **VPC**

This parameter is required.', example='VBR'),
}

model ListExpressConnectRouterSupportedRegionResponseBody = {
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   True
*   False', example='True'),
  supportedRegionIdList?: [ string ](name='SupportedRegionIdList', description='The regions in which the ECR feature is activated.'),
}

model ListExpressConnectRouterSupportedRegionResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListExpressConnectRouterSupportedRegionResponseBody(name='body'),
}

/**
 * @summary Queries a list of regions in which the Express Connect router (ECR) feature is activated.
 *
 * @param request ListExpressConnectRouterSupportedRegionRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListExpressConnectRouterSupportedRegionResponse
 */
async function listExpressConnectRouterSupportedRegionWithOptions(request: ListExpressConnectRouterSupportedRegionRequest, runtime: $RuntimeOptions): ListExpressConnectRouterSupportedRegionResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.nodeType)) {
    body['NodeType'] = request.nodeType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListExpressConnectRouterSupportedRegion',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of regions in which the Express Connect router (ECR) feature is activated.
 *
 * @param request ListExpressConnectRouterSupportedRegionRequest
 * @return ListExpressConnectRouterSupportedRegionResponse
 */
async function listExpressConnectRouterSupportedRegion(request: ListExpressConnectRouterSupportedRegionRequest): ListExpressConnectRouterSupportedRegionResponse {
  var runtime = new $RuntimeOptions{};
  return listExpressConnectRouterSupportedRegionWithOptions(request, runtime);
}

model ListTagResourcesRequest {
  maxResults?: int32(name='MaxResults', description='The maximum number of entries to return for a single request. Default value: 20.', example='20'),
  nextToken?: string(name='NextToken', description='The pagination token that is used in the next request to retrieve a new page of results. Valid values:

*   You do not need to specify this parameter for the first request.
*   You must specify the token that is obtained from the previous query as the value of NextToken.', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
  resourceId?: [ string ](name='ResourceId', description='The ECR IDs.

This parameter is required.'),
  resourceType?: string(name='ResourceType', description='The resource type. Set the value to EXPRESSCONNECTROUTER.

This parameter is required.', example='EXPRESSCONNECTROUTER'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `aliyun` or `acs:`.

You can specify up to 20 tag keys in each call.', example='TestKey'),
      value?: string(name='Value', description='The tag value. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `acs:` or `aliyun`. The tag value can be an empty string.

You can specify up to 20 tag values in each call.', example='TestValue'),
    }
  ](name='Tag', description='The tags.

You can bind up to 20 tags to an ECR.'),
}

model ListTagResourcesResponseBody = {
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  maxResults?: int32(name='MaxResults', description='The number of entries per page.', example='20'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  nextToken?: string(name='NextToken', description='A pagination token. It can be used in the next request to retrieve a new page of results. Valid values:

*   If **NextToken** is empty, no next page exists.
*   If a value of **NextToken** is returned, the value indicates the token that is used for the next query.', example='AAAAAYws9fJ0Ur4MGm/5OkDoW/Zn0J0/sCjivzwX9oBcwFnWaaas/kSG+J/WzLOxJHS4****'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
  tagResources?: [ 
    {
      resourceId?: string(name='ResourceId', description='The resource ID.', example='ecr-897j0jooxyr1aq****'),
      resourceType?: string(name='ResourceType', description='The resource type. The value is **EXPRESSCONNECTROUTER**.', example='EXPRESSCONNECTROUTER'),
      tagKey?: string(name='TagKey', description='The tag key.', example='TestKey'),
      tagValue?: string(name='TagValue', description='The tag value.', example='TestValue'),
    }
  ](name='TagResources', description='The tags.'),
  totalCount?: int32(name='TotalCount', description='The total number of records that meet the query conditions.', example='2'),
}

model ListTagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListTagResourcesResponseBody(name='body'),
}

/**
 * @summary Queries a list of tags that are added to an Express Connect router (ECR).
 *
 * @param request ListTagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListTagResourcesResponse
 */
async function listTagResourcesWithOptions(request: ListTagResourcesRequest, runtime: $RuntimeOptions): ListTagResourcesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.maxResults)) {
    body['MaxResults'] = request.maxResults;
  }
  if (!$isNull(request.nextToken)) {
    body['NextToken'] = request.nextToken;
  }
  if (!$isNull(request.resourceId)) {
    body['ResourceId'] = request.resourceId;
  }
  if (!$isNull(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!$isNull(request.tag)) {
    body['Tag'] = request.tag;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListTagResources',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of tags that are added to an Express Connect router (ECR).
 *
 * @param request ListTagResourcesRequest
 * @return ListTagResourcesResponse
 */
async function listTagResources(request: ListTagResourcesRequest): ListTagResourcesResponse {
  var runtime = new $RuntimeOptions{};
  return listTagResourcesWithOptions(request, runtime);
}

model ModifyExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  description?: string(name='Description', description='The description of the ECR.', example='test'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-fu8rszhgv7623c****'),
  name?: string(name='Name', description='The name of the ECR.', example='test'),
}

model ModifyExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.Name'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of Name **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful Valid values:

*   **true**
*   **false**', example='True'),
}

model ModifyExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Modifies the properties such as the name of an Express Connect router (ECR).
 *
 * @description You can modify only properties of ECRs in the **Active** state.
 *
 * @param request ModifyExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyExpressConnectRouterResponse
 */
async function modifyExpressConnectRouterWithOptions(request: ModifyExpressConnectRouterRequest, runtime: $RuntimeOptions): ModifyExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.name)) {
    body['Name'] = request.name;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the properties such as the name of an Express Connect router (ECR).
 *
 * @description You can modify only properties of ECRs in the **Active** state.
 *
 * @param request ModifyExpressConnectRouterRequest
 * @return ModifyExpressConnectRouterResponse
 */
async function modifyExpressConnectRouter(request: ModifyExpressConnectRouterRequest): ModifyExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return modifyExpressConnectRouterWithOptions(request, runtime);
}

model ModifyExpressConnectRouterAssociationAllowedPrefixRequest {
  allowedPrefixes?: [ string ](name='AllowedPrefixes', description='The allowed route prefixes.'),
  allowedPrefixesMode?: string(name='AllowedPrefixesMode'),
  associationId?: string(name='AssociationId', description='The ID of the association between the ECR and the VPC or TR.

This parameter is required.', example='ecr-assoc-9p2qxx5phpca2m****'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  ownerAccount?: string(name='OwnerAccount'),
}

model ModifyExpressConnectRouterAssociationAllowedPrefixResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='05130E79-588D-5C40-A718-C4863A59****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model ModifyExpressConnectRouterAssociationAllowedPrefixResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyExpressConnectRouterAssociationAllowedPrefixResponseBody(name='body'),
}

/**
 * @summary Modifies the route prefixes of a virtual private cloud (VPC) or a transit router (TR) that is associated with an Express Connect router (ECR).
 *
 * @param request ModifyExpressConnectRouterAssociationAllowedPrefixRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyExpressConnectRouterAssociationAllowedPrefixResponse
 */
async function modifyExpressConnectRouterAssociationAllowedPrefixWithOptions(request: ModifyExpressConnectRouterAssociationAllowedPrefixRequest, runtime: $RuntimeOptions): ModifyExpressConnectRouterAssociationAllowedPrefixResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.allowedPrefixes)) {
    body['AllowedPrefixes'] = request.allowedPrefixes;
  }
  if (!$isNull(request.allowedPrefixesMode)) {
    body['AllowedPrefixesMode'] = request.allowedPrefixesMode;
  }
  if (!$isNull(request.associationId)) {
    body['AssociationId'] = request.associationId;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.ownerAccount)) {
    body['OwnerAccount'] = request.ownerAccount;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyExpressConnectRouterAssociationAllowedPrefix',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the route prefixes of a virtual private cloud (VPC) or a transit router (TR) that is associated with an Express Connect router (ECR).
 *
 * @param request ModifyExpressConnectRouterAssociationAllowedPrefixRequest
 * @return ModifyExpressConnectRouterAssociationAllowedPrefixResponse
 */
async function modifyExpressConnectRouterAssociationAllowedPrefix(request: ModifyExpressConnectRouterAssociationAllowedPrefixRequest): ModifyExpressConnectRouterAssociationAllowedPrefixResponse {
  var runtime = new $RuntimeOptions{};
  return modifyExpressConnectRouterAssociationAllowedPrefixWithOptions(request, runtime);
}

model ModifyExpressConnectRouterInterRegionTransitModeRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='FF9nMec/RZ6H9oqFn1pvyir/SLRlxCCyHJonbGzqL01hiM6Jb3wJowdHvjCfog7ww1b9rSHMRFJnrUBfVba68TJg=='),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  transitModeList?: [ 
    {
      mode?: string(name='Mode', description='The cross-domain forwarding mode of the ECR. Valid values:

*   **ECMP**: the load balancing mode.
*   **NearBy**: the nearby forwarding mode.', example='ECMP'),
      regionId?: string(name='RegionId', description='The region ID of the ECR.', example='cn-hangzhou'),
    }
  ](name='TransitModeList', description='The cross-region forwarding modes.'),
}

model ModifyExpressConnectRouterInterRegionTransitModeResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model ModifyExpressConnectRouterInterRegionTransitModeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyExpressConnectRouterInterRegionTransitModeResponseBody(name='body'),
}

/**
 * @summary Modifies the cross-region forwarding mode of an Express Connect router (ECR).
 *
 * @param request ModifyExpressConnectRouterInterRegionTransitModeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyExpressConnectRouterInterRegionTransitModeResponse
 */
async function modifyExpressConnectRouterInterRegionTransitModeWithOptions(request: ModifyExpressConnectRouterInterRegionTransitModeRequest, runtime: $RuntimeOptions): ModifyExpressConnectRouterInterRegionTransitModeResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.transitModeList)) {
    body['TransitModeList'] = request.transitModeList;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyExpressConnectRouterInterRegionTransitMode',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the cross-region forwarding mode of an Express Connect router (ECR).
 *
 * @param request ModifyExpressConnectRouterInterRegionTransitModeRequest
 * @return ModifyExpressConnectRouterInterRegionTransitModeResponse
 */
async function modifyExpressConnectRouterInterRegionTransitMode(request: ModifyExpressConnectRouterInterRegionTransitModeRequest): ModifyExpressConnectRouterInterRegionTransitModeResponse {
  var runtime = new $RuntimeOptions{};
  return modifyExpressConnectRouterInterRegionTransitModeWithOptions(request, runtime);
}

model ModifyFlowLogAttributeRequest {
  clientToken?: string(name='ClientToken', example='02fb3da4-130e-11e9-8e44-00****'),
  description?: string(name='Description', example='myFlowlog'),
  dryRun?: boolean(name='DryRun', example='false'),
  ecrId?: string(name='EcrId', description='This parameter is required.', example='ecr-fu8rszhgv7623c****'),
  flowLogId?: string(name='FlowLogId', description='This parameter is required.', example='flowlog-m5evbtbpt****'),
  flowLogName?: string(name='FlowLogName', example='myFlowlog'),
  interval?: int32(name='Interval', example='600'),
  samplingRate?: string(name='SamplingRate', example='1:4096'),
}

model ModifyFlowLogAttributeResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', example='Authentication is failed for ****'),
  code?: string(name='Code', example='200'),
  dynamicCode?: string(name='DynamicCode', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', example='200'),
  message?: string(name='Message', example='OK'),
  requestId?: string(name='RequestId', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', example='True'),
}

model ModifyFlowLogAttributeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyFlowLogAttributeResponseBody(name='body'),
}

/**
 * @summary 修改流日志
 *
 * @param request ModifyFlowLogAttributeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyFlowLogAttributeResponse
 */
async function modifyFlowLogAttributeWithOptions(request: ModifyFlowLogAttributeRequest, runtime: $RuntimeOptions): ModifyFlowLogAttributeResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.flowLogId)) {
    query['FlowLogId'] = request.flowLogId;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.samplingRate)) {
    query['SamplingRate'] = request.samplingRate;
  }
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.flowLogName)) {
    body['FlowLogName'] = request.flowLogName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyFlowLogAttribute',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 修改流日志
 *
 * @param request ModifyFlowLogAttributeRequest
 * @return ModifyFlowLogAttributeResponse
 */
async function modifyFlowLogAttribute(request: ModifyFlowLogAttributeRequest): ModifyFlowLogAttributeResponse {
  var runtime = new $RuntimeOptions{};
  return modifyFlowLogAttributeWithOptions(request, runtime);
}

model MoveResourceGroupRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, and service limits. If the request fails the dry run, an error code is returned. If the request passes the dry run, the `DryRunOperation` error code is returned.
*   **false** (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.', example='false'),
  newResourceGroupId?: string(name='NewResourceGroupId', description='The ID of the new resource group. For more information about resource groups, see the "Resource Group" section of the [What is Resource Management?](https://help.aliyun.com/document_detail/94475.html) topic.

This parameter is required.', example='rg-acfmvt3xpr5****'),
  resourceId?: string(name='ResourceId', description='The ECR ID.

This parameter is required.', example='ecr-897j0jooxyr1aq****'),
  resourceType?: string(name='ResourceType', description='The resource type. Set the value to EXPRESSCONNECTROUTER.

This parameter is required.', example='EXPRESSCONNECTROUTER'),
}

model MoveResourceGroupResponseBody = {
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='true'),
}

model MoveResourceGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: MoveResourceGroupResponseBody(name='body'),
}

/**
 * @summary Modifies the resource group to which an Express Connect router (ECR) belongs.
 *
 * @param request MoveResourceGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return MoveResourceGroupResponse
 */
async function moveResourceGroupWithOptions(request: MoveResourceGroupRequest, runtime: $RuntimeOptions): MoveResourceGroupResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.newResourceGroupId)) {
    body['NewResourceGroupId'] = request.newResourceGroupId;
  }
  if (!$isNull(request.resourceId)) {
    body['ResourceId'] = request.resourceId;
  }
  if (!$isNull(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'MoveResourceGroup',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the resource group to which an Express Connect router (ECR) belongs.
 *
 * @param request MoveResourceGroupRequest
 * @return MoveResourceGroupResponse
 */
async function moveResourceGroup(request: MoveResourceGroupRequest): MoveResourceGroupResponse {
  var runtime = new $RuntimeOptions{};
  return moveResourceGroupWithOptions(request, runtime);
}

model RevokeInstanceFromExpressConnectRouterRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='true'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-mezk2idmsd0vx2****'),
  ecrOwnerAliUid?: long(name='EcrOwnerAliUid', description='The ID of the Alibaba Cloud account that owns the ECR from which you want to revoke permissions.

This parameter is required.', example='121012345612****'),
  instanceId?: string(name='InstanceId', description='The ID of the network instance.

This parameter is required.', example='vbr-j6cwxhgg0s5nuephp****'),
  instanceRegionId?: string(name='InstanceRegionId', description='The region ID of the network instance.

This parameter is required.', example='cn-hangzhou'),
  instanceType?: string(name='InstanceType', description='The type of the network instance. Valid values:

*   **VBR**
*   **VPC**

This parameter is required.', example='VBR'),
}

model RevokeInstanceFromExpressConnectRouterResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsJobId**, the request parameter **DtsJobId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='true'),
}

model RevokeInstanceFromExpressConnectRouterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RevokeInstanceFromExpressConnectRouterResponseBody(name='body'),
}

/**
 * @summary Revokes permissions on a virtual private cloud (VPC) or a virtual border router (VBR) from an Express Connect router (ECR) owned by another account.
 *
 * @param request RevokeInstanceFromExpressConnectRouterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RevokeInstanceFromExpressConnectRouterResponse
 */
async function revokeInstanceFromExpressConnectRouterWithOptions(request: RevokeInstanceFromExpressConnectRouterRequest, runtime: $RuntimeOptions): RevokeInstanceFromExpressConnectRouterResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  if (!$isNull(request.ecrOwnerAliUid)) {
    body['EcrOwnerAliUid'] = request.ecrOwnerAliUid;
  }
  if (!$isNull(request.instanceId)) {
    body['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceRegionId)) {
    body['InstanceRegionId'] = request.instanceRegionId;
  }
  if (!$isNull(request.instanceType)) {
    body['InstanceType'] = request.instanceType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'RevokeInstanceFromExpressConnectRouter',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Revokes permissions on a virtual private cloud (VPC) or a virtual border router (VBR) from an Express Connect router (ECR) owned by another account.
 *
 * @param request RevokeInstanceFromExpressConnectRouterRequest
 * @return RevokeInstanceFromExpressConnectRouterResponse
 */
async function revokeInstanceFromExpressConnectRouter(request: RevokeInstanceFromExpressConnectRouterRequest): RevokeInstanceFromExpressConnectRouterResponse {
  var runtime = new $RuntimeOptions{};
  return revokeInstanceFromExpressConnectRouterWithOptions(request, runtime);
}

model SynchronizeExpressConnectRouterInterRegionBandwidthRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  ecrId?: string(name='EcrId', description='The ECR ID.

This parameter is required.', example='ecr-fu8rszhgv7623c****'),
}

model SynchronizeExpressConnectRouterInterRegionBandwidthResponseBody = {
  accessDeniedDetail?: string(name='AccessDeniedDetail', description='The details about the access denial.', example='Authentication is failed for ****'),
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  dynamicCode?: string(name='DynamicCode', description='The dynamic error code.', example='IllegalParamFormat.EcrId'),
  dynamicMessage?: string(name='DynamicMessage', description='The dynamic part in the error message. This parameter is used to replace the `%s` variable in **ErrMessage**.

>  For example, if the value of **ErrMessage** is **The Value of Input Parameter %s is not valid** and the value of **DynamicMessage** is **DtsInstanceId**, the request parameter **DtsInstanceId** is invalid.', example='The param format of EcrId **** is illegal.'),
  httpStatusCode?: int32(name='HttpStatusCode', description='The HTTP status code.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='True'),
}

model SynchronizeExpressConnectRouterInterRegionBandwidthResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SynchronizeExpressConnectRouterInterRegionBandwidthResponseBody(name='body'),
}

/**
 * @summary Synchronizes the forwarding bandwidth limit between regions for an Express Connect router (ECR).
 *
 * @description Updates are allowed only when the ECR is in the **Active** state.
 *
 * @param request SynchronizeExpressConnectRouterInterRegionBandwidthRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SynchronizeExpressConnectRouterInterRegionBandwidthResponse
 */
async function synchronizeExpressConnectRouterInterRegionBandwidthWithOptions(request: SynchronizeExpressConnectRouterInterRegionBandwidthRequest, runtime: $RuntimeOptions): SynchronizeExpressConnectRouterInterRegionBandwidthResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.ecrId)) {
    body['EcrId'] = request.ecrId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'SynchronizeExpressConnectRouterInterRegionBandwidth',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Synchronizes the forwarding bandwidth limit between regions for an Express Connect router (ECR).
 *
 * @description Updates are allowed only when the ECR is in the **Active** state.
 *
 * @param request SynchronizeExpressConnectRouterInterRegionBandwidthRequest
 * @return SynchronizeExpressConnectRouterInterRegionBandwidthResponse
 */
async function synchronizeExpressConnectRouterInterRegionBandwidth(request: SynchronizeExpressConnectRouterInterRegionBandwidthRequest): SynchronizeExpressConnectRouterInterRegionBandwidthResponse {
  var runtime = new $RuntimeOptions{};
  return synchronizeExpressConnectRouterInterRegionBandwidthWithOptions(request, runtime);
}

model TagResourcesRequest {
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  resourceId?: [ string ](name='ResourceId', description='The ECR IDs.

This parameter is required.'),
  resourceType?: string(name='ResourceType', description='The resource type. Set the value to **EXPRESSCONNECTROUTER**.

This parameter is required.', example='EXPRESSCONNECTROUTER'),
  tag?: [ 
    {
      key?: string(name='Key', description='The tag key.

The tag key cannot be an empty string. The tag key can be up to 64 characters in length and cannot contain `http://` or `https://`. The tag key cannot start with `aliyun` or `acs:`.

You can specify up to 20 tag keys in each call.', example='TestKey'),
      value?: string(name='Value', description='The tag value. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. The tag value cannot start with `acs:` or `aliyun`. The tag value can be an empty string.

You can add up to 20 tag values in each call.', example='TestValue'),
    }
  ](name='Tag', description='The tags to be added.

This parameter is required.'),
}

model TagResourcesResponseBody = {
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='true'),
}

model TagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TagResourcesResponseBody(name='body'),
}

/**
 * @summary Adds tags to an Express Connect router (ECR). You can add tags to only one ECR each time you call this operation. You can add multiple tags at a time.
 *
 * @param request TagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TagResourcesResponse
 */
async function tagResourcesWithOptions(request: TagResourcesRequest, runtime: $RuntimeOptions): TagResourcesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.resourceId)) {
    body['ResourceId'] = request.resourceId;
  }
  if (!$isNull(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!$isNull(request.tag)) {
    body['Tag'] = request.tag;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'TagResources',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Adds tags to an Express Connect router (ECR). You can add tags to only one ECR each time you call this operation. You can add multiple tags at a time.
 *
 * @param request TagResourcesRequest
 * @return TagResourcesResponse
 */
async function tagResources(request: TagResourcesRequest): TagResourcesResponse {
  var runtime = new $RuntimeOptions{};
  return tagResourcesWithOptions(request, runtime);
}

model UntagResourcesRequest {
  all?: boolean(name='All', description='Specifies whether to remove all tags. This parameter is valid only when the TagKey.N parameter is not specified. Valid values:

*   true
*   false

Default value: false.', example='false'),
  clientToken?: string(name='ClientToken', description='The client token that is used to ensure the idempotence of the request.

You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters.

>  If you do not specify this parameter, the system automatically uses the **request ID** as the **client token**. The **request ID** may be different for each request.', example='02fb3da4-130e-11e9-8e44-00****'),
  dryRun?: boolean(name='DryRun', description='Specifies whether to perform only a dry run, without performing the actual request. Valid values:

*   **true**: performs only a dry run.
*   **false** (default): performs a dry run and performs the actual request.', example='false'),
  resourceId?: [ string ](name='ResourceId', description='The ECR IDs.

This parameter is required.'),
  resourceType?: string(name='ResourceType', description='The resource type. Set the value to **EXPRESSCONNECTROUTER**.

This parameter is required.', example='EXPRESSCONNECTROUTER'),
  tagKey?: [ string ](name='TagKey', description='The keys of the tags that you want to remove from the ECRs.'),
}

model UntagResourcesResponseBody = {
  code?: string(name='Code', description='The response code. The status code 200 indicates that the request was successful. Other status codes indicate that the request failed. For more information, see Error codes.', example='200'),
  message?: string(name='Message', description='The returned message.', example='OK'),
  requestId?: string(name='RequestId', description='The request ID.', example='6FABF516-FED3-5697-BDA2-B18C5D9A****'),
  success?: boolean(name='Success', description='Indicates whether the request was successful. Valid values:

*   **true**
*   **false**', example='true'),
}

model UntagResourcesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UntagResourcesResponseBody(name='body'),
}

/**
 * @summary Removes tags from an Express Connect router (ECR).
 *
 * @param request UntagResourcesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UntagResourcesResponse
 */
async function untagResourcesWithOptions(request: UntagResourcesRequest, runtime: $RuntimeOptions): UntagResourcesResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.all)) {
    body['All'] = request.all;
  }
  if (!$isNull(request.clientToken)) {
    body['ClientToken'] = request.clientToken;
  }
  if (!$isNull(request.dryRun)) {
    body['DryRun'] = request.dryRun;
  }
  if (!$isNull(request.resourceId)) {
    body['ResourceId'] = request.resourceId;
  }
  if (!$isNull(request.resourceType)) {
    body['ResourceType'] = request.resourceType;
  }
  if (!$isNull(request.tagKey)) {
    body['TagKey'] = request.tagKey;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UntagResources',
    version = '2023-09-01',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Removes tags from an Express Connect router (ECR).
 *
 * @param request UntagResourcesRequest
 * @return UntagResourcesResponse
 */
async function untagResources(request: UntagResourcesRequest): UntagResourcesResponse {
  var runtime = new $RuntimeOptions{};
  return untagResourcesWithOptions(request, runtime);
}

